#pragma once

#include <stdlib.h>     //exit
#include <string>
#define Die(code)   \
    do              \
    {               \
        exit(code); \
    } while (0)

enum exitCode
{
    SOCKET_ERR = 1,
    BIND_ERR,
    LISTEN_ERR,
    USE_ERR,
    ACCEPT_ERR,
    EPOLL_CREATE_ERR,
    EPOLL_CTRL_ERR
};

#define CONVERSE(src) ((struct sockaddr*)src)
